<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 152 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */
 .style152p200{position:absolute;left:205px;top:440px}

 /* Position Styles */
 .ts152p0{position:absolute;left:106px;top:97px;}
 .ts152p1{position:absolute;left:352px;top:97px;}
 .ts152p3{position:absolute;left:665px;top:97px;}
 .ts152p7{position:absolute;left:106px;top:113px;}
 .ts152p8{position:absolute;left:706px;top:1026px;}
 .ts152p9{position:absolute;left:331px;top:1044px;}
 .ts152p13{position:absolute;left:106px;top:146px;}
 .ts152p14{position:absolute;left:106px;top:164px;}
 .ts152p15{position:absolute;left:106px;top:183px;}
 .ts152p17{position:absolute;left:106px;top:201px;}
 .ts152p18{position:absolute;left:106px;top:220px;}
 .ts152p19{position:absolute;left:106px;top:238px;}
 .ts152p21{position:absolute;left:106px;top:256px;}
 .ts152p22{position:absolute;left:106px;top:275px;}
 .ts152p23{position:absolute;left:106px;top:293px;}
 .ts152p25{position:absolute;left:106px;top:312px;}
 .ts152p26{position:absolute;left:106px;top:330px;}
 .ts152p27{position:absolute;left:106px;top:348px;}
 .ts152p28{position:absolute;left:106px;top:367px;}
 .ts152p30{position:absolute;left:106px;top:385px;}
 .ts152p32{position:absolute;left:106px;top:404px;}
 .ts152p33{position:absolute;left:376px;top:421px;}
 .ts152p35{position:absolute;left:631px;top:705px;}
 .ts152p36{position:absolute;left:106px;top:721px;}
 .ts152p37{position:absolute;left:106px;top:739px;}
 .ts152p38{position:absolute;left:106px;top:758px;}
 .ts152p40{position:absolute;left:106px;top:776px;}
 .ts152p41{position:absolute;left:106px;top:794px;}
 .ts152p42{position:absolute;left:106px;top:813px;}
 .ts152p45{position:absolute;left:106px;top:831px;}
 .ts152p46{position:absolute;left:106px;top:850px;}
 .ts152p47{position:absolute;left:106px;top:868px;}
 .ts152p48{position:absolute;left:106px;top:886px;}
 .ts152p50{position:absolute;left:106px;top:905px;}

 /* Font Styles */
 .ft0p152{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p152{font-weight:normal;}
 .ft2p152{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p152{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p152{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p152{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft6p152{font-style:normal;font-weight:bold;font-size:16px;font-family:helvetica,arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground152{position:absolute;left:105px;top:1030px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index151.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;152 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index153.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground152><img src="./background152.png" width="625" height="25" border="0" alt=""></div>
<div class=style152p200><img src="./image152_200.png" width="426" height="280" border="0" alt=""></DIV>
<div class=ts152p0><span class="ft0p152"> </span></div>
<div class=ts152p1><span class="ft0p152">Gravitybox Schedule Primer<span class="ft1p152"> </span></span></div>
<div class=ts152p3><span class="ft0p152">Page 150&nbsp; </span></div>
<div class=ts152p7><span class="ft2p152"> </span></div>
<div class=ts152p8><span class="ft3p152"> </span></div>
<div class=ts152p9><span class="ft4p152">1998&#45;2004 Gravitybox Software LLC<span class="ft3p152"> </span></span></div>
<div class=ts152p13><span class="ft5p152"> </span></div>
<div class=ts152p14><span class="ft5p152">The first thing that needs to be done is to inform the list box that it needs to be set for </span></div>
<div class=ts152p15><span class="ft5p152">OLE dragging. In its MouseDown event, call its OLEStartDrag method. This will begin a </span></div>
<div class=ts152p17><span class="ft5p152">drag. So that target destination knows what type of drag formats the list box supports, </span></div>
<div class=ts152p18><span class="ft5p152">we set the drag format to the schedule drag format. This is a special constant defined </span></div>
<div class=ts152p19><span class="ft5p152">by the schedule in its OLEDragFormat property. If a target drop destination actually </span></div>
<div class=ts152p21><span class="ft5p152">wants the data, it is set through its OLESetData event. In this event you should set the </span></div>
<div class=ts152p22><span class="ft5p152">data the schedule expects. The only data that the schedule wants is the appointment </span></div>
<div class=ts152p23><span class="ft5p152">length. If you do not set any data the length will be set to the default </span></div>
<div class=ts152p25><span class="ft5p152">ScheduleIncrement. If you have a desired length for the new appointment set it by </span></div>
<div class=ts152p26><span class="ft5p152">creating a byte array using the schedule&#146;s CreateByteArray method. Send in the </span></div>
<div class=ts152p27><span class="ft5p152">appointment length and an array of bytes that represent this value is returned. This </span></div>
<div class=ts152p28><span class="ft5p152">value is used to populate the Data object. The outline of the appointment as the user is </span></div>
<div class=ts152p30><span class="ft5p152">dragging over the schedule will be this length. </span></div>
<div class=ts152p32><span class="ft5p152"> </span></div>
<div class=ts152p33><span class="ft6p152">Figure 15.1 </span></div>
<div class=ts152p35><span class="ft5p152"> </span></div>
<div class=ts152p36><span class="ft5p152"> </span></div>
<div class=ts152p37><span class="ft5p152">The final event used is the schedule&#146;s AfterAdd event. This will allow us to set the text </span></div>
<div class=ts152p38><span class="ft5p152">displayed inside of the appointment. After the drop the new appointment&#146;s index in the </span></div>
<div class=ts152p40><span class="ft5p152">ScheduleItems collection is returned as a parameter. You may use this to access the </span></div>
<div class=ts152p41><span class="ft5p152">newly added object and set it DisplayText property. The appointment then will have </span></div>
<div class=ts152p42><span class="ft5p152">been added and the text will have been set.&nbsp; </span></div>
<div class=ts152p45><span class="ft5p152"> </span></div>
<div class=ts152p46><span class="ft5p152">This is entire application. It will allow you to add appointments by dragging them from an </span></div>
<div class=ts152p47><span class="ft5p152">external object. Keep in mind that the schedule&#146;s AllowOtherDrops property must be set </span></div>
<div class=ts152p48><span class="ft5p152">to true. This allows you to configure whether the schedule actually allows this type of </span></div>
<div class=ts152p50><span class="ft5p152">appointment adding in the first place. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
